-- GENERATED SPELL FOR [Skadir Raider] --


function spell0_25522(pUnit, Event) --@Freezing Trap,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(43414,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_25522', 1, 1)
end

function spell1_25522(pUnit, Event) --@Throw Spear,n/a--
pUnit:FullCastSpellOnTarget(43413,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25522', 1500, 1)
end

function Sorts_25522(pUnit, Event)
local choix_sorts_25522 = math.random(0, 1)
if choix_sorts_25522 == 0 then
pUnit:RegisterEvent('spell0_25522', 1, 1)
end
if choix_sorts_25522 == 1 then
pUnit:RegisterEvent('spell1_25522', 1, 1)
end
end

function mob25522_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25522', math.random(1500, 3000), 1)
end

function mob25522_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25522_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25522_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25522, 1, 'mob25522_Action')
RegisterUnitEvent(25522, 2, 'mob25522_Leave')
RegisterUnitEvent(25522, 3, 'mob25522_Kill')
RegisterUnitEvent(25522, 4, 'mob25522_Die')
